import { LoginInput, LoginOutput } from '/@/api-services/models/system';
import { BaseApi } from '/@/api-services/apis/baseApi';

/**
 * 认证服务
 */
class SysAuthApi extends BaseApi {  

    //登录
    login = async(data:LoginInput)=>{
        return this.normalPost<LoginOutput>(`/login`,data)
    }

    //退出
    loginOut = async()=>{
        return this.normalGet(`/loginOut`,null)  
    }

    //获取验证码
    getCaptcha=async()=>{
        return this.normalGet<object>(`/GetCaptcha`,null)    
    }
    //获取登录时配置
    getConfig=async()=>{
        return this.normalGet<object>(`/GetConfig`,null)
    }
}

export default new SysAuthApi('/system/auth');